<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Amaze UI</title>
  <link rel="stylesheet" href="http://cdn.amazeui.org/amazeui/2.7.2/css/amazeui.css">
  <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
  <script src="http://cdn.amazeui.org/amazeui/2.7.2/js/amazeui.js"></script>
</head>

<body>
  <div class="container">
    <button type="button" class="am-btn am-btn-success" id="doc-prompt-toggle">
			Prompt
		</button>

    <div class="am-modal am-modal-prompt" tabindex="-1" id="my-prompt">
      <div class="am-modal-dialog">
        <div class="am-modal-hd">Amaze UI</div>
        <div class="am-modal-bd">
          来来来，吐槽点啥吧
          <input type="text" class="am-modal-prompt-input">
        </div>
        <div class="am-modal-footer">
          <span class="am-modal-btn" data-am-modal-cancel>取消</span>
          <span class="am-modal-btn" data-am-modal-confirm>提交</span>
        </div>
      </div>
    </div>
  </div>
</body>
<script>
  $(function() {
    $('#doc-prompt-toggle').on('click', function() {
      $('#my-prompt').modal({
        relatedTarget: this,
        onConfirm: function(e) {
          alert('你输入的是：' + e.data || '')
        },
        onCancel: function(e) {
          alert('不想说!');
        }
      });
    });
  });
</script>

</html>